package com.coolingme.mapper;

import java.util.List;

import com.coolingme.entity.User;
import com.coolingme.entity.UserVo;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

public interface UserMapper extends BaseMapper<User> {

	/**
	 * 自定义sql
	 * 
	 * @param wrapper 构造器
	 * @return User集合
	 */
	List<User> listByCustomSql(@Param(Constants.WRAPPER) Wrapper<?> wrapper);

	/**
	 * 自定义分页+多表联查
	 * 
	 * @param page
	 * @param userVo
	 * @return
	 */
	IPage<User> listUserPage(Page<User> page, @Param("vo") UserVo userVo);

}
